//
//  UIView.m
//  Meng800
//
//  Created by 姚宗超 on 14-7-23.
//  Copyright (c) 2014年 点财网. All rights reserved.
//

#import "UIView+NIB.h"

@implementation UIView (NIB)

+ (id) loadNibNamed:(NSString *) nibName {
    return [UIView loadNibNamed:nibName fromBundle:nil];
}

+ (id) loadNibNamed:(NSString *) nibName fromBundle:(NSBundle *) bundle {
    UINib *nib = [UINib nibWithNibName:nibName bundle:bundle];
    if(!nib) return nil;
    UIView *target = [[nib instantiateWithOwner:nil options:nil] objectAtIndex:0];
    return target;
}

@end
